package client.application;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import client.ClientView;

/*
 * Author : Mohamed Delhomme
 */

public class DisconnectAction extends AbstractAction {

/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
private ClientView client;
	
	public DisconnectAction(ClientView client, String texte){
		super(texte);
		
		this.client = client;
	}
	
	public void actionPerformed(ActionEvent e) { 
//		client.clientCore.disconnectFromServer();
		
		client.buttonConnectServer.setEnabled(true);
		client.buttonDisconnectServer.setEnabled(false);
		client.connectItem.setEnabled(true);
		client.disconnectItem.setEnabled(false);
		client.labelLinkServer.setText("   Status : you are currently disconnected   ");
		
		client.connectItem.setEnabled(true);
		client.disconnectItem.setEnabled(false);
		
		client.listSongsAvailable.removeAll();
		client.listSongsChoosen.removeAll();
	}

}
